package com.hl.payServer.core.wePay;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.hl.payServer.annotation.Optional;
import com.hl.payServer.model.enums.FeeType;
import com.hl.payServer.model.enums.WepayField;
import com.hl.payServer.serializer.FeeTypeDeserializer;

import java.io.Serializable;

/**
 * 公众号支付响应对象
 */
public class MicroPayResponse implements Serializable {
    /**
     * 微信订单号
     */
    @Optional
    @JsonProperty(WepayField.TRANSACTION_ID)
    private String transactionId;

    /**
     * 随机字符串
     */
    @JsonProperty(WepayField.NONCE_STR)
    private String nonceStr;


    @JsonProperty(WepayField.BANK_TYPE)
    private String bankType;

    @JsonProperty(WepayField.OPEN_ID)
    private String openId;

    @JsonProperty(WepayField.SIGN)
    private String sign;

    @JsonProperty(WepayField.RETURN_MSG)
    private String returnMsg;

    /**
     * 货币类型
     */
    @JsonProperty(WepayField.FEE_TYPE)
    @JsonDeserialize(using = FeeTypeDeserializer.class)
    private FeeType feeType;


    @JsonProperty(WepayField.MCH_ID)
    private String mchId;

    /**
     * 现金支付金额
     */
    @JsonProperty(WepayField.CASH_FEE)
    private String cashFee;

    /**
     * 商户订单号
     */
    @JsonProperty(WepayField.OUT_TRADE_NO)
    private String outTradeNo;

    @JsonProperty(WepayField.CASH_FEE_TYPE)
    private String cashFeeType;

    @JsonProperty(WepayField.APP_ID)
    private String appId;

    /**
     * 订单总金额
     */
    @JsonProperty(WepayField.TOTAL_FEE)
    private String totalFee;

    @JsonProperty(WepayField.TRADE_TYPE)
    private String tradeType;

    @JsonProperty(WepayField.RESULT_CODE)
    private String resultCode;

    @JsonProperty(WepayField.ATTACH)
    private String attach;

    @JsonProperty(WepayField.TIME_END)
    private String timeEnd;

    @JsonProperty(WepayField.IS_SUBSCRIBE)
    private String is_subscribe;

    @JsonProperty(WepayField.RETURN_CODE)
    private String returnCode;

    @JsonProperty(WepayField.ERR_CODE)
    private String errCode;

    @JsonProperty(WepayField.ERR_CODE_DES)
    private String errCodeDes;

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public String getNonceStr() {
        return nonceStr;
    }

    public void setNonceStr(String nonceStr) {
        this.nonceStr = nonceStr;
    }

    public String getBankType() {
        return bankType;
    }

    public void setBankType(String bankType) {
        this.bankType = bankType;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }

    public FeeType getFeeType() {
        return feeType;
    }

    public void setFeeType(FeeType feeType) {
        this.feeType = feeType;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getCashFee() {
        return cashFee;
    }

    public void setCashFee(String cashFee) {
        this.cashFee = cashFee;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public String getCashFeeType() {
        return cashFeeType;
    }

    public void setCashFeeType(String cashFeeType) {
        this.cashFeeType = cashFeeType;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(String totalFee) {
        this.totalFee = totalFee;
    }

    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public String getTimeEnd() {
        return timeEnd;
    }

    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd;
    }

    public String getIs_subscribe() {
        return is_subscribe;
    }

    public void setIs_subscribe(String is_subscribe) {
        this.is_subscribe = is_subscribe;
    }

    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrCodeDes() {
        return errCodeDes;
    }

    public void setErrCodeDes(String errCodeDes) {
        this.errCodeDes = errCodeDes;
    }
}
